home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Textfiles / HackintoshBiblev1.3.sit / Hackintosh Bible v1.3.rsrc / TEXT_137.txt < prev    next >
Text File  |  1996-11-10  |  33KB  |  728 lines

  1. Last Modified: 24-MAY-96
  2. +-------------------------------------------------------------------mh<DoH!>-+
  3. | M______.  A______.  C______.     H____.    A______.  C______.  K____.      |
  4. |  )     :\  )     :\  )     :\     )   / /\  )     :\  )     :\  )   / /\/\ |
  5. | /       :\/   /\  :\/   /\__/_   /   /__\:\/   /\  :\/   /\__/_/   /_/   / |
  6. |/   /  \  :\  /  \  :\   \_\  :\ /   ____  :\  /  \  :\   \_\  :\  .__.  :\ |
  7. |\___\__/______\   \____________/ \___\  /______\   \_______________\   \___\|
  8. +--------------------------------------S.ssSS88$$s----S-S----,ssSS88$$8s-----+
  9.  Contributors: AX1P, Filbert,          S8   '"~$$~    S8 8S   8$$8S"~~~$8S
  10.  Observer, Maddog Hoek, oleBuzzard,   S8             S8   8S  S8$$      ~8S
  11.  Armchair Hacker, ArcAngel, Nganon   S8$.ssSS88$$s  S8$   $8S  S8$$      $8S
  12.  DATE -=> 04-MARCH-1996             S8$    '"~$$~  S8$.sss.$8S  S8$       $8S
  13.  ______kn0wledge phreak BBS______  S8$$           S8$$'"~"'$$8S  S8$      $$8S
  14.   New home of MHFAQ 719.578.8288  S8$$           S8$$       $$8S  S8s  $   $$8S
  15.    WebSite: http://iti2.net/k0p  S8$$$          S8$$$  ver  $$$8S  S8s $$ s$$$8
  16.        e-mail: k0p@iti2.net       ~$~            ~$~   2.0   ~$~    ~S8$$$Ss~$~
  17. ======================================================================$$$$====
  18.                                                                       ~~#$
  19.  
  20. 00. Introduction to the MacHackFAQ v2.0
  21.  
  22. SECTION I: SOFTWARE DEPROTECTION/'CRACKING'
  23. -------------------------------------------
  24. 01. What is MACSBUG?
  25. 02. Where can I find MacsBug?
  26. 03. How do you use MacsBug?
  27. 04. How can I use MacsBug to crack software?
  28. 05. What are some other useful MacsBug related resources?
  29.  
  30. SECTION II: SYSTEMS HACKING
  31. ---------------------------
  32. 06. What are some general techniques for defeating Macintosh Security?
  33. 07. What are some general tools for defeating Macintosh Security?
  34. 08. How can I Hack At Ease?
  35. 09. How can I use DisEase to Hack At Ease?
  36. 10. Where can I find DisEase?
  37. 11. How can I Hack FoolProof?
  38. 12. How do I access the Chooser when it is protected on Foolproof?
  39. 13. How can I defeat Passworded Control Panels?
  40. 14. How can I defeat the DeskTracy Control Panel (at Kinko's)?
  41. 15. What is EtherNet or Packet Sniffing?
  42. 16. How can I EtherNet Sniff on the Mac?
  43. 17. How can I defeat a FileGuard protected system?
  44.  
  45. SECTION III: SYSTEMS HACKING
  46. ----------------------------
  47. 18. How Can I hack FirstClass?
  48. 19. What is UNIX Password Hacking?
  49. 20. How Can I do it on the Mac?
  50.  
  51. SECTION IV: PHREAKING
  52. ---------------------
  53. 21. What is phreaking?
  54. 22. What are some phreaking warez for Macs?
  55. 23. How can I use these programs?
  56.  
  57. SECTION V: MAC UNDERGROUND RESOURCES
  58. ------------------------------------
  59. 24. What are some Sites of interest to Mac Hackers?
  60. 25. What are some Warez of Interest to Mac Hackers?
  61.  
  62. SECTION VI: MAC HACK TIDBITS
  63. ----------------------------
  64. 26. How do I copy a read-only file?
  65. 27. Where can I get the latest version of macpgp and the source code?
  66. 28. How can I convert a Read Only text file?
  67. 29. How can I Disable Extension Disabling on my Mac?
  68. 30. Is there a way to disable the Power-down Button
  69. 31. Is there a way to turn off zoomrects in System 7?
  70.  
  71. 32. Outro
  72.  
  73. =============================================================================
  74.  
  75. 00. Introduction to the MacHackFAQ v2.0
  76.  
  77. Welcome to the MacHackFAQ v2.0! This thing has been awhile in the making, but
  78. I think I've revamped it to a level that I can work with. I'd like to be able
  79. to put out new FAQs at least every three months, the greatest determinor of
  80. that will be the volume of article submissions. To start this FAQ off, heres
  81. some House Cleaning issues:
  82.  
  83. Contributors--Contributors this month are: Observer, Maddog Hoek, Voyager,
  84. ArcAngel, AX1P, Spooty, Filbert, The Jackal, Mark O'Connel, Nganon, me
  85. (oleBuzzard). Thanx to everyone who contributed. My apologies to anyone who
  86. contributed that I failed to acknowledge.
  87.  
  88. MacHack FAQ Header--This additions Header was created by Maddog Hoek. If you
  89. are an ASCII artist, and would like to submit a Header for upcoming FAQs
  90. please contact me.
  91.  
  92. Home of the FAQ--An html versions of the FAQ can be found at kn0wledge phreak
  93. WWW page. Text versions of MacHack FAQ can be found at kn0wledge phreak WWW
  94. page or kn0wledge phreak BBS
  95.  
  96. Submissions, Corrections, Praises, Complaints, Suggestions--If you want to
  97. contact me regarding any of the following, please feel free to e-mail me.
  98. Please label your subject as one of the five subjects.
  99.  
  100. Addresses--I kept saying you could contact me, I supposed you'd like to know
  101. where.
  102.  
  103. oleBuzzard's E-mail Address: k0p@iti2.net
  104.   kn0wledge Phreak WWW Page: http://iti2.net/k0p
  105.        kn0wledge phreak BBS: 719-578-8288
  106.  
  107. SECTION I: SOFTWARE DEPROTECTION/'CRACKING'
  108. -------------------------------------------
  109.  
  110. 01. What is MACSBUG?
  111.  
  112. MacsBug is an acronym for Motorola advanced computer systems deBugger. It is
  113. an assembly-language-level debugging tool for the Macintosh and Power
  114. Macintosh computers. MacsBug was written by Motorola (creator of the 68000
  115. series chip) to aid programmer's in development of Macintosh software. The
  116. versatility of MacsBug also makes it a very useful tool for software
  117. deprotection.
  118.  
  119. 02. Where can I find MacsBug?
  120.  
  121. MacsBug can be found at the Apple Corporation FTP Support Site:
  122.  
  123.  
  124. http://www.support.apple.com/pub/Apple%20SW%20Updates/US/Macintosh/Utilities
  125.  
  126. 03. How do you use MacsBug?
  127.  
  128. The answer comes from Observer in an Original piece written for the FAQ:
  129.  
  130. Macsbug for Fun and Profit
  131. Macsbug is an awesome program published by Apple and available for free. It's
  132. used by programmers to debug their programs, and crackers to help them in
  133. their work. Macsbug (MB) is what's called a "low-level debugger." This is
  134. because it works at a very low level--in other words, looking at the actual
  135. instructions being executed by the computer. Currently, the latest version of
  136. MB is 6.5.2.
  137.  
  138. Installing Macsbug is easy. Drop it in your System Folder and restart. Don't
  139. double click on it, don't put it in the Extensions folder, don't try to give
  140. it more memory--just put it in the System Folder and let it be. The next time
  141. you restart, the message "Debugger installed" will accompany your normal
  142. Welcome to Macintosh message. This confirms that Macsbug is loaded.
  143.  
  144. To stop processing and enter Macsbug (called breaking into Macsbug), press
  145. the interrupt button on your Mac. This is a small button with a circle on it.
  146. Inside the circle is a little squiggly line that looks sort of like an EKG
  147. (sometimes it's just a circle, though). It will often be accompanied by an
  148. adjacent small button with a triangle in it. This is the reset button.
  149.  
  150. Anyway, press the interrupt button, and Macsbug will appear. If your computer
  151. is one of those without hardware reset/interrupt buttons, press cmd-power.
  152. (cmd-ctrl-power is the equivalent of the reset button.)
  153.  
  154. Macsbug makes you look very cool when you use it. This is because it looks
  155. like sheer hell to anyone who doesn't know how to interpret what it gives
  156. you. What does it give you? Here's an ASCII picture of a MB screen: (view in
  157. Monaco)
  158. ___________________________________________________________________
  159. |    SP      |                                                    |
  160. |  nnnnnn    |                                                    |
  161. |            |                                                    |
  162. | CurApName  |                                                    |
  163. | SimpleText |                                                    |
  164. |            |                                                    |
  165. | 32-bit RM  |             [previously executed                   |
  166. | SR SmxNZvc |              instructions, plus                    |
  167. |            |              output generated by                   |
  168. | D0 nnnnnn  |              your commands, show up                |
  169. | [...]      |              here]                                 |
  170. | D6 nnnnnn  |                                                    |
  171. | D7 nnnnnn  |                                                    |
  172. |            |____________________________________________________|
  173. |            | [proc name]                  ; will branch         |
  174. | A0 nnnnnn  |   +nnnn     nnnnnn   BCC.S          | 641A         |
  175. | [...]      |   +nnnn     nnnnnn * MOVE.L         | 2008         |
  176. | A7 nnnnnn  |   +nnnn     nnnnnn   CLR.W          | 4267         |
  177. |____________|_____________________________________|______________|
  178.  
  179. Whoa! What the HELL is all this stuff? (And who in the world uses it?)
  180. Basically, unless you're using assembly language on the Mac (as a programmer
  181. or cracker, for example), you don't need to know what all this stuff means.
  182. For the benefit of those who care, however, here you go. (Other people, skip
  183. down to the next section.)
  184.  
  185. SP
  186. Stack Pointer. Not too important except for programmers/crackers.
  187.  
  188. CurApName
  189. The name of the currently running application. This is NOT (NOT NOT
  190. NOT)not the frontmost application! Many times it will not be. To ensure
  191. that an application will be running when you break into macsbug, hold down
  192. one of its menus.
  193.  
  194. 32-bit RM
  195. Indicates whether you are in 32 or 24 bit memory mode (on any modern Mac will
  196. always be 32)fairly  and whether you're using Real Memory or Virtual
  197. Memory.
  198.  
  199. D0-D7, A0-A7: Data and address registers on the 680x0 chip, where data is
  200. sometimes stored.
  201.  
  202. [proc name]
  203. The name of the subprogram which is being executed, or "no procedure name" if
  204. none is available. If ResEdit/Resorcerer tell you the name of a subprogram is
  205. something line "<Anon_17>," MB just says "no procedure name."
  206.  
  207. ; will branch
  208. If the next instruction to be executed (the instruction directly below the
  209. procedure name) is a branch, this will pop up and say whether or not the
  210. branch will occur.
  211.  
  212. +nnnn
  213. The offset within the current procedure of the instruction on that line.
  214.  
  215. nnnnnn
  216. The absolute address in memory of the instruction on that line.
  217.  
  218. *
  219. Shows up if there's a breakpoint set on an instruction. Unless you're setting
  220. breakpoints, you won't get any of these.
  221.  
  222. BCC.S, MOVE.L, etc.
  223. The next assembly instructions which will be executed.
  224.  
  225. 641A, 2008, etc.
  226. The hex equivalent of these instructions.
  227.  
  228. And that's about it. There are lots of worthwhile things you can do in
  229. Macsbug without understanding all this stuff, though.
  230.  
  231. es
  232. Exit to Shell. Attempts to quit the current program and go back to the
  233. finder. If you crash and use this, it's best to restart the computer ASAP.
  234.  
  235. rs
  236. ReStart. Useful if you crash and can't use es, but don't want to do a
  237. hardware restart. Better than turning the computer off, because it unmounts
  238. mounted volumes.
  239.  
  240. rb
  241. ReBoot. Same as rs, but doesn't unmount mounted volumes. This makes it more
  242. or less the same as turning the computer off and then back on, or hitting a
  243. hardware reset button.
  244.  
  245. help <topic | command>
  246. Displays help for the specified topic or command. To see a list of topics,
  247. just type "help".
  248.  
  249. Base 10 <-> Base 16 (hex) <-> ASCII conversion
  250. Enter a number preceded by # for decimal, $ for hex, or in single quotes
  251. (i.e. 'q') for ASCII. Hit return. What pops up is the hex, decimal and ASCII
  252. equivalent! Nifty, eh?
  253.  
  254. Error ID lookup
  255. Crashed and want to know just what an error -43 is? Break into Macsbug and
  256. type:
  257.  
  258. error #(error ID in base 10)
  259.  
  260. and Macsbug will tell you what the error means.
  261.  
  262. A calculator!
  263. Macsbug can perform mathematical operations, such as *, +, -, /, even between
  264. number systems!
  265.  
  266. You can also do some fun stuff with Macsbug:
  267.  
  268. sw menuflash [hexadecimal number 1-FFFF]
  269. Sets the number of times a menu item flashes when selected. If you set this
  270. over 50 or so, be prepared to be very patient!
  271.  
  272. Strobe light
  273. Type "swap". Macsbug will say "Display will be swapped after each trace or
  274. step." Now type "s 20" and hit return. Ooooh!! Aaaah!! Make the number bigger
  275. if you like, but be patient... Type swap again to end the process.
  276.  
  277. And in case it ever comes up in Trivial Pursuit:
  278. The name Macsbug has nothing to do with Macs. It is an acronym for Motorola
  279. Advanced Computing Systems deBUGger. If Apple had called their computers
  280. Donuts, Macsbug would still be called Macsbug. (Motorola comes in, for those
  281. who don't know, because Motorola makes the 680x0 chips which were the heart
  282. of every Mac until the PowerPC, which is still made by Motorola.)
  283.  
  284. For Andy Ihnatko's typically unique spin (I mean that kindly, Andy) on
  285. Macsbug, check out the last page of the Feb 96 MacUser. If you're a Mac
  286. programmer and want to know how to use Macsbug to examine your programs,
  287. check out _Debugging Macintosh Software with Macsbug_, by Othmer and Straus.
  288. For information on how to use Macsbug itself, Apple publishes a manual which
  289. costs about $30.
  290.  
  291. 04. How can I use MacsBug to crack software?
  292.  
  293. "How do I get blahblahware to stop asking me to register?"
  294. (Also known as, "Will someone give me a crack to blahblahware?")
  295.  
  296. Intro...
  297. Cracking software is a huge topic--not always difficult, but one with many
  298. different aspects, all of which can be important. This is just the first step
  299. down a long road, and I urge anyone interested in truly learning about
  300. cracking to check out the "Further Reading" section at the bottom. Also, the
  301. first two appendixes (glossary and assembly reference) aren't meant as
  302. afterthoughts but as important parts of the text. Use them. Appendix 3 is
  303. useful if you want Resorcerer (which you do).
  304.  
  305. Background...
  306. Anyone who's written a few real Mac applications (or one big one) in Pascal,
  307. C, or any similar language is a good candidate to become a Mac cracker.
  308. However far down from there you rank yourself, is how much harder it's going
  309. to be for you to crack software. Try if you like, but knowing how to program
  310. is useful if you want to modify programs.
  311.  
  312. If you're freaked out about assembly language, don't be; a decent programmer
  313. in Pascal or C can acquire a fluency in assembly fairly easily. All your
  314. friends from the Toolbox exist in assembly, just with an underscore ("_")
  315. before their names. And we call them traps, rather than calls. But other than
  316. that they're pretty much the same. And lots of cracking is just changing
  317. branches, like changing conditions in an "if" statement. Nothing too hairy,
  318. right?
  319.  
  320. People generally write programs in what's called a high-level language, a
  321. language that's far from what the computer actually does but is easy for a
  322. human to remember and work with. HyperTalk is a very high-level language.
  323. Pascal and C are another notch or two down the line. In order for the
  324. computer to run programs written in these high-level languages, you need a
  325. compiler. This is a program which translates what you've written in Pascal
  326. (gibberish to the computer), into assembly language, the specific
  327. instructions which the CPU will execute to run your program. So when you open
  328. a program and look at its CODE resources, you're looking at some
  329. representation of the actual instructions the computer follows to run that
  330. program.
  331.  
  332. The Hunt...
  333. Note I said some representation. If you're using ResEdit, all you'll see is
  334. the code in hexadecimal. This doesn't do you much good. To view it as its
  335. assembly code equivalent, either spring for Resorcerer (a $256 ResEdit done
  336. right), or get the ResEdit CODE Editor, which is free and publicly available.
  337. Once you install the resources in the CODE Editor into your ResEdit
  338. application, when you open a CODE resource, you'll see something like this
  339. (and also get some new menus):
  340.  
  341. Offset     Addr      Opcode        Operand          Comment
  342. ===========================================================
  343.  
  344. Here's what this all means:
  345.  
  346. Offset
  347. The line number in bytes, counting from the beginning of the CODE
  348. resource segment
  349.  
  350. Addr
  351. The line number, counting from the beginning of the current
  352. procedure/subprogram
  353.  
  354. Opcode
  355. The assembly instruction to execute
  356.  
  357. Operand
  358. Data which accompanies the instruction (parameters)
  359.  
  360. Comment
  361. Misc. info on a line of code, plus hex representation of the line
  362.  
  363. All this exists in Resorcerer as well, just with slightly different names. To
  364. toggle between viewing absolute and relative offsets in Resorcerer, press
  365. cmd-2 while viewing a CODE resource.
  366.  
  367. Go to the "Modules" (Routines in Resorcerer) menu. There you'll find a list,
  368. in the order they exist in the code, of all of the procedures in that code
  369. segment. (Happy Resorcerer users will have this menu alphabetized.) Find a
  370. program which has more than anon1, anon2, etc. Procedure names are a huge
  371. help to a cracker, because let's say you want to remove a registration dialog
  372. box--which catches your eye more, "DoRegDialog," or "anon36?"
  373.  
  374. So you have your program. Let's say what's annoying you is that it always
  375. shows a dialog which you can't dismiss for a few seconds, until it enables
  376. the OK button.
  377.  
  378. Go look at the program's DLOG resources and find the dialog you want to
  379. avoid. If it isn't there, check out the WIND resources as well. Convert the
  380. dialog/window's ID number into hex. If you can't do this manually, Resorcerer
  381. can do it for you, or else find one of the many shareware calculators that
  382. has the capability. Also, TI-85 owners can just punch go into the mode
  383. settings and set it to use hex. Never thought that thing would come in handy,
  384. did you?
  385.  
  386. Anyway. Search for this value in the code, just a few lines before a call to
  387. the _GetNewDialog trap. (Cmd-G in Resorcerer, or hold down option when
  388. opening the CODE resource in ResEdit and use ResEdit's search tools.) Here's
  389. a sample from an actual application, whose nag dialog is DLOG ID #9990=$2706:
  390.  
  391. move.w    #$2706,-(sp)
  392. clr.l     -(sp)
  393. pea       -$0001
  394. _GetNewDialog
  395.  
  396. What's this doing? It's MOVEing the hex number $2706 to "sp." This is the
  397. Stack Pointer, a place where things are stored temporarily--typically
  398. parameters passed to a procedure or function, and afterwards what it returns.
  399. Sure enough, the next line is:
  400. movea.l   (sp)+,a4
  401.  
  402. This is where we move the DialogPtr given to us by _GetNewDialog, off of the
  403. stack pointer and put its address in register A4. (We know GetNewDialog
  404. returns a DialogPtr because we bought the Inside Mac CD while we were doing
  405. Mac programming in a high-level language. I wasn't kidding when I said Mac
  406. programming experience would help.)
  407.  
  408. The Kill...
  409. OK, so now we know where the dialog is loaded. And, because we've used
  410. dialogs in a higher-level language before, we know that other toolbox
  411. calls--ModalDialog and CloseDialog for example--tend to accompany a
  412. GetNewDialog call. Further, the problem we wish to overcome is that it stops
  413. for a few seconds before enabling the OK button. This implicates another
  414. likely accomplice, HiliteControl, which is used to enable and disable dialog
  415. items.
  416.  
  417. Let's say the programmer was a jerk and left the subprogram names in the
  418. code. Maybe the subprogram you found the dialog in is called "DoNagBox." If
  419. it's this obvious, you could try NOP'ing the entire DoNagBox subprogram. Note
  420. that while this is easy in Resorcerer, it is very difficult in ResEdit.
  421.  
  422. Maybe that doesn't work. Maybe that makes the program crash. OK, time to try
  423. something else. While the nag box is open, break into Macsbug (read about
  424. that in another section of the FAQ) and type "atb closedialog". This will
  425. cause Macsbug to interrupt processing when a call to the _CloseDialog trap is
  426. made. Dismiss the nag dialog, and poof, you're in Macsbug. Use the "t"
  427. command to step through the code, through the subprogram which holds the
  428. _GetNewDialog for the nag box. When you hit an "rts," keep going--the next
  429. line will be the line after the line which calls the nag subprogram. Here's a
  430. little diagram:
  431.  
  432.                  /-> doNagBox
  433.                 /      [other assembly]
  434. [assembly]     /       move.w $2706, -(sp)
  435.               /        _GetNewDialog
  436. jsr doNagBox /         [more assembly]
  437.  
  438. [more assembly]<---\   _CloseDialog
  439.                     \  [still more assembly]
  440.                      \-rts
  441.  
  442. We reach "jsr doNagBox," which sends us off to the doNagBox subprogram. This
  443. puts up a dialog and then closes it when we hit a button. When all this has
  444. been done, we're returned to the line of code immediately following the "jsr
  445. doNagBox" line. Just like any other language.
  446.  
  447. We could NOP the "jsr doNagBox," but that tends to be asking for trouble; any
  448. parameters passed to or received from the subprogram are left wandering
  449. around, which will probably cause a crash. What we should look for are
  450. branches, probably beq or bne. Is there one of these above the jsr which
  451. skips down just a few lines past the jsr? If so, try changing the condition
  452. of this branch (such as beq->bra).
  453.  
  454. Other Techniques
  455. The idea of looking for a dialog's ID is one which frequently works. However,
  456. there are other limitations you might want to overcome. Here are some ideas
  457. for other program limitations:
  458. Only works for x minutes, then quits
  459. Look for the _TickCount trap (hex A975) in the code--this is the most common
  460. method of doing this. Something else to watch for is _ExitToShell, (hex
  461. A9F4), which MAY be the way the program quits itself. If the subprogram names
  462. are in the code, look especially hard at anything resembling "eventloop,"
  463. "mainloop," etc.
  464.  
  465. Only works for a week
  466. Look for the _SecondsToDate (hex A9C6) trap, and a branch a while after it.
  467. Also, if a dialog pops up to tell you to register, look for the ID of this
  468. dialog.
  469.  
  470. Only lets you play the first x levels
  471. Several possibilities here. If a dialog appears when you reach a higher
  472. level, the easiest is to search for the dialog ID in the code. If it quits,
  473. look for _ExitToShell. If you absolutely can't find what you're looking for,
  474. search for the highest possible level number in the code. (If you can only
  475. play levels 1-4, search for $0004.) If this shows up in or near some form of
  476. cmp, you may have struck paydirt.
  477.  
  478. Practice, Practice, Practice
  479. With just a few months of practice, you'll be surprised at how many things
  480. you can crack in less than an hour. Here are some things you can try looking
  481. at, in order of difficulty: (easiest->hardest)
  482. Relax 1.0 (any shareware site)
  483. GraphicConverter 1.7.7 /1 (ditto)
  484. Warcraft 1.0
  485. Net Watchman demo (ftp.aggroup.com) (don't worry about printing)
  486. GopherGolf 2.0.7 (shareware again)
  487. DragStrip 1.2.4
  488.  
  489. (Note: Some of these are commercial software. These cracks should only be
  490. attempted on software you own, and for your own convenience.)
  491.  
  492. Appendix 1: Glossary
  493. Branch:
  494. Each command in assembly has an offset, essentially a line number. Branching
  495. to an offset sets the PC to the specified offset and then continues execution
  496. normally.
  497.  
  498. Byte, word, long word:
  499. The most common data sizes. Use monaco for the table below:
  500.         Bits   Hex digits    Range (decimal)
  501. Byte  |   8        2         0-255
  502. Word  |  16        4        0-65535
  503. LWord |  32        8      0-4294967295
  504.  
  505. These can be halved to alter the range to include negative values. So a byte
  506. can also be used to go from #-127 to #127, a word from #-32767 to #32767, and
  507. so on. In a long word (for example) this is accomplished by going from $0 to
  508. $7FFF (#0-#32767) normally. $8000 is then equal to #-32767, up to $FFFF=#-1.
  509. The same system is used for the other data sizes as well.
  510.  
  511. Flags:
  512. There are five status flags: Z, C, N, V, X. These keep track of the results
  513. of operations. Conditional branches such as bne and beq check the flags to
  514. decide whether or not to branch.
  515. Z: Zero flag. Set if the result of an operation is zero, or if two compared
  516. values are equal. Cleared otherwise.
  517. C: Carry flag. Set if the a math operation produced a digit carry (i.e.
  518. $FF+$1)
  519. N: Negative flag. Set if the result of a math operation is negative, or the
  520. most significant (rightmost) bit in a number is true.
  521. V: Overflow flag. Set if an operation's result can't be held in the data
  522. provided (such as $FF+$1 in a byte). Not too common.
  523. X: Extended flag. Used for precision in math operations. Also not too common.
  524.  
  525. Hexadecimal:
  526. Usually referred to as hex. This is base 16. Our number system is base 10
  527. (aka decimal), which means each column is ten times the previous one. In hex,
  528. you start with the ones column, then you have a sixteens column, then a 256's
  529. column, and so on. Hex is just like our normal system, except you count to 15
  530. before going to the next place. The extra 6 numbers you need for this are
  531. provided by the letters A-F. So counting in hex goes like this:
  532. 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F,
  533. 20,21...
  534.  The signs # and $ are used to indicate decimal (base 10) and hexadecimal,
  535. respectively. So #10=$A; (#15+#1)=($F+$1)=$10; #255=$FF; and so on.
  536. Two hexadecimal digits are equivalent to eight bits, or one byte.
  537.  
  538. Registers:
  539. 680x0 chips have 16 registers, which are places to hold data (essentially a
  540. variable in higher-level languages). These are divided into 8 data registers,
  541. labeled D0-D7, and 8 address registers, labeled A0-A7. Each register can hold
  542. a long word. The address and data registers are themselves identical, but
  543. there are commands which can be used on address registers which cannot be
  544. used on data registers.
  545.  
  546. Subprogram/Subroutine/Procedure/Function:
  547. Used more or less interchangeably. If used specifically, they mean the same
  548. thing they would in a high-level language.
  549.  
  550. Appendix 2: Quick Assembly Instruction Reference
  551. This is a brief description of the most common commands in assembly language.
  552. There are many others however, and anyone seriously wanting to learn how to
  553. crack will soon need more than this. See the "further reading" section for
  554. suggestions.
  555. Suffixes: .b, .w, .l
  556. Indicates that the suffixed instruction will apply to a Byte, Word, or Long
  557. word, respectively. So cmp.b will compare two bytes.
  558.  
  559. add
  560. ADDs two values, and stores the result in the second operand. The Z flag is
  561. set if the result was zero, cleared otherwise.
  562.  
  563. beq
  564. Branch if EQual. Branches if Z flag is set. 67 hex.
  565.  
  566. bne
  567. Branch if Not Equal. Branch if the Z flag is clear. 66 hex.
  568.  
  569. bra
  570. BRanch Always. Move PC to the indicated offset and continue. 60 hex.
  571.  
  572. clr
  573. CLeaR. Sets its operand to zero.
  574.  
  575. cmp
  576. CoMPares two values. If the values are equal then the Z flag is set.
  577. Otherwise it is cleared.
  578.  
  579. jsr/rts
  580. Jump SubRoutine. Exactly like calling a procedure or function in a high-level
  581. language: sets PC to the subprogram's address, but first puts the PC's
  582. current value on the stack. When the specified subprogram is completed, the
  583. rts ("ReTurn from Subroutine") command will be used to return to where the
  584. subprogram was called.
  585.  
  586. link/unlk
  587. LINK/UNLinK. Generally used to create local variables for subprograms. (Link
  588. creates, unlink disposes at end of subprogram.)
  589.  
  590. move
  591. MOVEs the first operand into the second. When you see something like (A2), it
  592. means that the data stored in the address held in A2 is being used. A2
  593. without the parentheses means the actual data held in A2.
  594.  
  595. nop
  596. No OPeration. Useful for simply deleting code without changing the location
  597. in memory of other code. 4E71 hex.
  598.  
  599. sub
  600. SUBtract. Same as add, but subtracts the first operand from the second.
  601.  
  602. Appendix 3: Ordering Resorcerer, a cracker's best friend
  603. The single-copy price of Resorcerer is US $256 (decimal!).  We also offer
  604. quantity, reseller, and educational discounts at anywhere between 20% and 50%
  605. off of the above price.  Please call us for more information and a quote.
  606.  
  607. Our mailing address is:
  608. Mathemaesthetics, Inc.
  609. P.O. Box 298
  610. Boulder, CO, 80306-0298
  611. Phone: (303) 440-0707
  612. Fax:     (303) 440-0504
  613.  
  614. Internet: resorcerer@aol.com
  615.  
  616. Appendix 4: FURTHER READING
  617. Surprise surprise, a few pages aren't enough to teach you assembly language.
  618. For more information, check out these sources...
  619. Files by The Shepherd and Vassal
  620. Each of these guys has written a much bigger file on Mac cracking. The
  621. Shepherd's is the larger one and better for the beginner (and a great file in
  622. general), Vassal's offers more specific technique tips. I used the Shepherd's
  623. file as a reference for the assembly reference section here.
  624.  
  625. Basic MacCracking files
  626. I've written a few files which describe how to crack specific programs. Of
  627. course I'm biased, but I think these are all very helpful to beginners,
  628. especially since they were written as I learned things myself.
  629.  
  630. Fantasm's help files
  631. Fantasm is an assembly language development program, for the sickos who
  632. actually create whole programs in assembly language. While using the program
  633. itself has been shown to cause severe social problems, it comes with six
  634. large files written to teach someone how to write assembly language. These
  635. aren't something anyone serious about this stuff should pass up.
  636.  
  637. Debugging Macintosh Software with Macsbug
  638. Macsbug in invaluable to a cracker. I would be shot if I took the space to
  639. describe how to use it here, but it's not that hard to figure out. What is
  640. hard is discovering how to use it in the context of a Macintosh (i.e. where
  641. is the event record that _waitnextevent just got?), and this book tells you
  642. all of that.
  643.  
  644. Macsbug Reference and Debugging Guide
  645. Apple's Macsbug documentation, plus EXCELLENT assembly tutorial. Another one
  646. serious folks shouldn't miss out on.
  647.  
  648. 05. What are some other useful MacsBug related resources?
  649.  
  650. DBugr 1.2.1...........Puts a floating bomb on your desktop that you can click
  651.  
  652.                       on at any time to enter macs bug. Widely available.
  653.                       http://vsl.cnet.com Search: 'macsbug'
  654.  
  655. Break Before..........Break into MacsBug on the very first instruction of the
  656.  
  657.                       INIT code of ANY extension you choose. Widely
  658. available.
  659.                       http://vsl.cnet.com Search 'macsbug'
  660.  
  661. Debugger F-Key........Drop into the debugger. Recognizes MacsBug, TMON, The
  662.                       Debugger, and ABZmon. Will also recognize any new
  663.                       debuggers that follow Apple's debugger protocol as
  664.                       documented in the "MacsBug Reference and Debugging
  665.                       Guide." http://vsl.cnet.com Search 'macsbug'
  666.  
  667. Cool MacsBug Tricks...Cool things you can do with MacsBug.
  668.                       http://www.biddeford.com/~benyc/Macsbug.html
  669.  
  670. Tips for MacsBug......Place to obtain and submit MacsBug programming tips.
  671.                       http://www.scruznet.com/~crawford/Computers/macsbug.html
  672.  
  673. SECTION II: SYSTEMS HACKING
  674. ---------------------------
  675.  
  676. 06. What are some general techniques for defeating Macintosh Security?
  677.  
  678. Here are a few:
  679.  
  680.   * Restart a system with the Shift-key down to disable extensions.
  681.   * Restart with the built-in ROM Disk available on some Macs. Hold:
  682.     Command-Option-x-o during boot-up.
  683.   * Boot from a floppy. Even if floppy startup has been disabled, you should
  684.     be able to force it by holding down the command-option-shift-delete key
  685.     combo to boot the floppy. This key combo won't let the internal hard
  686.     drive mount.
  687.  
  688. 07. What are some general tools for defeating Macintosh Security?
  689.  
  690. MUST HAVES for defeating Secured Macs are Keystroke Recorders, file wipers
  691. and the System 7.5 Disk Tools.
  692.  
  693. Keystroke Recorders--Keystroke Recorders are normally Control Panels, which
  694. when activated, will record every keystroke made on a system. In many cases
  695. the log containing all of the Keystroks is stored in a covert place for later
  696. retreival. A few keystroke recorders are:
  697.  
  698.   Invisible Oasis.......http://wheel.dcn.davis.ca.us/~sean/hack/hack.html
  699.   MacLife Insurance.....http://vsl.cnet.com Search: 'maclifeinsurance'
  700.   SuperSave 1.x.........http://vsl.cnet.com Search: 'super save'
  701.  
  702. File Wipers--File wipers are utilities that can remove a file from a Hard
  703. Disks by physically writing over it. Many files are protected against
  704. deletion by the prevention of routines which allow their altering. File
  705. wipers can circumvent this protection because they don't perform the routines
  706. involved in altering a file, instead they just write over the file with null
  707. data. As a result the file is eliminated and thereby rendered NON-FUNCTIONAL.
  708. This makes them a very valuable in defeating Macintosh security. File wipers
  709. have the ability to wipe: locked file, protected files, running programs, the
  710. system folder, themselves, anything. A few file wipers are:
  711.  
  712.   Burn 2.2.............http://vsl.cnet.com Search: 'Burn'
  713.   Flame File v1.5.8....http://vsl.cnet.com Search: 'flamefile'
  714.   Obliterate v1.1......http://vsl.cnet.com Search: 'Obliterate'
  715.   The Eraser 2.0.0.....ftp://ftp.euro.net/Mac/info-mac/disk/eraser-20.hqx
  716.  
  717.  
  718. System 7.5 Disk Tools--System 7.5 Disk Tools contains a Finder and
  719. Mini-System on a single 1.44 HD Floppy thereby alllowing you to boot from the
  720. Floppy Drive. The 7.5 Disk Tools are a part of the System 7.5.
  721.  
  722. 08. How can I Hack At Ease?
  723.  
  724. There are numerous ways to Hack At Ease. Here are a Few:
  725.  
  726. Programmer's Switch--Hit the programmer's switch (see section on MacsBug) and
  727. type: G FINDER. This should break you out of At Ease and leave you in the
  728. Finder. Once you're in in the the Finder you've pretty much hacked